home *** CD-ROM | disk | FTP | other *** search
/ Quarterdeck InternetSuite / Quarterdeck InternetSuite.iso / qsockpro.qip / MPX.MPS < prev    next >
Encoding:
Text File  |  1996-03-20  |  1.7 KB  |  76 lines

  1. # Microplex PPP and SLIP login script
  2. # Australia's Premier Internet Service Provider
  3. #
  4. # 4/June/95 - SLE
  5. #
  6.  
  7. STRING username
  8. STRING password
  9. STRING framing
  10. STRING IPAddress
  11.      
  12. SetTimeOut  60
  13. CfgGetValue "Username" username
  14.  
  15. IF result = 0 THEN
  16.     GetInput "Enter your username:"  username
  17.     IF result = 0 THEN
  18.         PRINT "Warning, no username entered."
  19.     ELSE
  20.         PRINT "Username set to: ";username
  21.         CfgSetValue "Username" username
  22.     ENDIF
  23. ENDIF
  24.     
  25. CfgGetValue "Password" password
  26. IF result = 0 THEN
  27.     GetPassword "Enter your password:" password
  28.     IF result = 0 THEN
  29.         PRINT "Warning, no password entered."
  30.     ENDIF
  31. ENDIF
  32.     
  33. CfgGetValue "Framing" framing
  34. IF result = 0 THEN
  35.     ABORT "Can't read 'Framing' setting from QDECK.INI."
  36. ENDIF                            # don't wait for spaces
  37.  
  38. CommWaitFor "username:"            # case sensitive
  39.  
  40. CommSend        username
  41. CommSend        "%r"            # send ENTER
  42.     
  43. CommWaitFor     "password:"
  44. CommSend        password
  45. CommSend        "%r"            # send ENTER
  46.     
  47. CommWaitFor     "annex:"
  48.     
  49. # The Annex terminal server requires a macro to be exectued for connection
  50. # ppp for PPP connection and slip for SLIP. It is case sensitive.
  51.  
  52. IF framing = "MPPPP" THEN
  53.     CommSend   "ppp"
  54. ENDIF
  55.  
  56. IF framing = "MPSLIP" THEN
  57.     CommSend   "slip"
  58. ENDIF                
  59.  
  60.     CommSend        "%r"
  61.  
  62. IF framing = "MPSLIP" THEN
  63.     PRINT "%rGetting IP Address for SLIP"
  64.     CommWaitFor "Your address is "
  65.     CommReadIPAddr IPAddress
  66.  
  67.     IF result < 7 THEN            # IP Address length test
  68.         ABORT "Invalid IP Address"
  69.     ENDIF
  70.  
  71.     CfgSetValue "IPAddress" ipaddress
  72.     PRINT "%rIP Address set to "; ipaddress
  73. ENDIF
  74.  
  75. END
  76.